package net.maku.kyy.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.maku.framework.common.utils.DateUtils;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户Token
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "用户Token")
public class KyyUserTokenVO implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * access_token
	 */
	@Schema(description = "access_token")
	@JsonProperty(value = "access_token")
	private String accessToken;

	/**
	 * refresh_token
	 */
	@Schema(description = "refresh_token")
	@JsonProperty(value = "refresh_token")
	private String refreshToken;

	@Schema(description = "access_token 过期时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
	private LocalDateTime accessTokenExpire;

	@Schema(description = "refresh_token 过期时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
	private LocalDateTime refreshTokenExpire;
	

}